Type argument 指“类型实参”:在泛型(generics)或参数化类型(parameterized types)中,用来替换类型参数(type parameter)的具体类型。常见于 Java/C#/C++/TypeScript 等语言中。
(注:在不同语言/语境下也可能指更广义的“传给类型构造器的参数类型”。)
/taɪp ˈɑːrɡjəmənt/
In List<String>, String is the type argument.
在 List<String> 中,String 就是类型实参(type argument)。
The compiler checks whether the type argument satisfies the generic constraint before allowing the instantiation.
编译器会在允许实例化之前检查该类型实参是否满足泛型约束。
type 来自希腊语 typos(印记、模子),引申为“类型/类别”;argument 来自拉丁语 argumentum(论据、所给出的内容)。在编程语境里,argument 常指“传入的具体值/具体内容”,因此 type argument 就是“传入的具体类型”。
List<String> 这类类型实参的讨论)。